﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using FutureOpen.Web.Pages;
using FutureOpen.Core;
using FutureOpen.Core.func;
using FutureOpen.Core.func.db;
using System.Collections.Generic;

public partial class OrgList : PageBase
{
    private MyOrg ObjMyOrg = new MyOrg();
    protected void Page_Load(object sender, EventArgs e)
    {
        base.PageInit();
        if (!IsPostBack)
        {           
            AspNetPager1.RecordCount = ObjMyOrg.GetAllOrgCount();
            BindOrgList(0, 10);
        }
    }
    private void BindOrgList(int start, int count)
    {     
        IList<Org> orgList = ObjMyOrg.GetOrgList(start, count, -1, null);
        DataList1.DataSource = orgList;
        DataList1.DataBind();
    }
    protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)
    {
        AspNetPager1.CurrentPageIndex = e.NewPageIndex;
        BindOrgList((AspNetPager1.CurrentPageIndex - 1) * 10, 10);
    }
}
